package com.ysd.twocrm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

//课程表
@TableName(value="course")
public class Course {
    @TableId(value = "cid",type = IdType.AUTO)
    private Integer cid;//课程主键

    private String cname;//课程名

    private String cSemester;//所属学期

    private Integer exit1;//备用字段1

    private String exit2;//备用字段2
@TableField(exist = false)//标志这个字段非数据库字段
    private List<CourseChildren> courseChildren;//一对多

    public Course(Integer cid, String cname, String cSemester, Integer exit1, String exit2) {
        this.cid = cid;
        this.cname = cname;
        this.cSemester = cSemester;
        this.exit1 = exit1;
        this.exit2 = exit2;
    }

    @Override
    public String toString() {
        return "Course{" +
                "cid=" + cid +
                ", cname='" + cname + '\'' +
                ", cSemester='" + cSemester + '\'' +
                ", exit1=" + exit1 +
                ", exit2='" + exit2 + '\'' +
                '}';
    }

    public Course() {
        super();
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getcSemester() {
        return cSemester;
    }

    public void setcSemester(String cSemester) {
        this.cSemester = cSemester;
    }

    public Integer getExit1() {
        return exit1;
    }

    public void setExit1(Integer exit1) {
        this.exit1 = exit1;
    }

    public String getExit2() {
        return exit2;
    }

    public void setExit2(String exit2) {
        this.exit2 = exit2;
    }
}
